-
Package wb
-
Main.java
Main class containing the graphic user interface components of the
Whiteboard window.
-
Package widget
-
DrawCanvas.java
The major Canvas for drawing and displaying images and markups.
-
Package graph
-
Package port
This package contains two layers: the interface layer for communication
between ports and the control layer for interacting with the local user
interface.
-
port.idl
Interface definition file (IDL) for the port package. Two interfaces
are defined: MessagePortIF and ImagePortIF. (IF stands for interface.)
Also defined are exception "PortException", a user information data structure
UserInfo, and an image data structure Image.
ImagePortIF is a subclass of MessagePortIF so that it inherits all
the operations of MessagePortIF.
-
MessagePort.java
The controller object for the message port. It acts as a client to
remote message ports. It invokes and controls the display of all remote
requests. This class has a bi-directional link to the class MessagePortImpl.
-
MessagePortImpl.java
The interface implementation class for the message port. It also
implements some helper operations.
-
ImagePort.java
The controller object for the image port. It acts as a client
to remote image ports. It invokes and controls the display of all remote
requests. This class has a bi-directional link to the class ImagePortImpl.
-
ImagePortImpl.java
The interface implementation class for the image port. It also
implements some helper operations.
To build the port package, do (this will be automatically called
if you build from the whiteboard home directory):
which is a batch file for building the package on Windows.
It will first invoke the IDL compiler and then compile the source codes.
A subdirectory named "port" will be created, which contains the CORBA stub
and skeleton codes and all class files for the package. A JAR file
port.jar is also made, which will be used by the Shared Whiteboard.
The message port code can be run by itself without resorting to ImagePort.
To run, do:
You may run multiple message port this way and have them connected
to one another.
TestImagePort.bat is a batch file for testing the image port via a terminal.
-
Package jni
This package contains codes for using the java native interface to
access various image library functions.
-
ImagePort.java
-
Java Native Interface to various image library functions. (Not
to be confused with the one of the same name under the port package.)
Two native methods are defined: read(file) and write(file).
ImagePort.cpp
Contains the native methods that exchange data structure with jni/ImagePort.java.